1. Field of the Invention
The invention relates generally to a memory management scheme and, more particularly, to using a cache memory with a locking feature to process streaming data more efficiently.
2. Description of the Related Art
In a large configuration computer system, there are several levels of a memory hierarchy, the lowest level being a system memory and higher levels being caches that hold frequently accessed data closer to the computing engine.
A level one (L1) cache is usually not shared by computing engines in a computer system. A level two (L2) cache is usually shared by computing engines in the system. Generally, caches keep data close to the computing engines, and the data stored in a cache will be re-used with a much better latency.
For streaming data applications, large volumes of data are pulled or pushed through the cache with very little re-use, if any. In prior art, least recently used algorithms are used to determine which data in the cache should be replaced by the new data. For streaming data, this results in data having high re-use in the cache being replaced by a large volume of streaming data having low re-use, thus minimizing the effectiveness of the cache in reducing the access latency of frequently used data. In this streaming situation, the cache is effectively “thrashed” (frequently replaced) by the streaming data, making the use of the cache inefficient.
A prior art approach for avoiding this behavior is to make the streaming data non-cacheable to prevent thrashing of the cache with low re-use streaming data. However, this has the negative side effect of significantly increasing the latency of the streaming data accesses, since cache pre-fetch and partial access mechanisms are disabled. On-chip cache to cache transfer of this data is also lost if caching of the data is inhibited.
Therefore, a need exists for a system and method for managing streaming data within a cache in a more efficient manner.